package com.example.cicddemo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
@Slf4j
public class CicdDemoApplication {

    public static void main(String[] args) {

        SpringApplication.run(CicdDemoApplication.class, args);
    }
    @GetMapping("/hello")
    public String hello() {
        log.info("收到请求{}","hello");
        return "hello";
    }

    @GetMapping("/hello/{param}")
    public String hello(@PathVariable String param) {
        log.info("收到请求{}",param);
        return param;
    }

}
